﻿Public Class DBGenSettings
    Private server_name As String
    Private db_name As String
    Private version As Integer
    Private systemSQLscriptsPath As String
    Private db_path As String
    Private fileDbName As String
    Private path As String
    Private script As String        ' sa neuklada do xml suboru
    Public ReadOnly Property DBFileName() As String
        Get
            Return fileDbName
        End Get
    End Property
    Public ReadOnly Property ServerName() As String
        Get
            Return server_name
        End Get
    End Property
    Public ReadOnly Property DbName() As String
        Get
            Return db_name
        End Get
    End Property
    Public ReadOnly Property Ver() As String
        Get
            Return version
        End Get
    End Property
    Public ReadOnly Property SystSQLscriptsPath() As String
        Get
            Return systemSQLscriptsPath
        End Get
    End Property
    Public ReadOnly Property DbPath() As String
        Get
            Return db_path
        End Get
    End Property

    Public Property SavePath() As String
        Get
            Return path
        End Get
        Set(ByVal Value As String)
            path = Value
        End Set
    End Property

    Public Property SystemScript() As String
        Get
            Return script
        End Get
        Set(ByVal Value As String)
            script = Value
        End Set
    End Property

    Public Sub New(ByVal fileDBname As String, ByVal server_name As String, ByVal db_name As String, ByVal version As Integer, ByVal systemSQLScriptPath As String, ByVal dbPath As String, ByVal Script As String)
        Me.server_name = server_name
        Me.db_name = db_name
        Me.version = version
        Me.systemSQLscriptsPath = systemSQLScriptPath
        Me.db_path = dbPath
        Me.script = Script
        Me.fileDbName = fileDBname
    End Sub



    Public ReadOnly Property areSettingsCorrect() As Boolean
        Get
            If ((Me.DBFileName.Length = 0) Or (Me.DbName.Length = 0) Or (Me.DbPath.Length = 0) Or (Me.ServerName.Length = 0)) Then Return False

            Return True

        End Get

    End Property


End Class
